package fun.codefarmer.pm.model;

/**
 * @ ClassName RespBean
 * @ Descriotion TODO
 * @ author  codeFarmer_z
 * @ 公众号：码农教程
 * @ Date 2022/3/19 22:06
 **/
public class RespBean {
    private Integer status;
    private String msg;
    private Object obj;

    public static RespBean ok(String msg) {
        return new RespBean(200,msg,null);
    }
    public static RespBean ok(String msg,Object o) {
        return new RespBean(200,msg,o);
    }
    public static RespBean error(String msg) {
        return new RespBean(500,msg,null);
    }
    public static RespBean error(String msg,Object o) {
        return new RespBean(500,msg,o);
    }
    private RespBean() {

    }

    public RespBean(Integer status, String msg, Object object) {
        this.status = status;
        this.msg = msg;
        this.obj = object;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getObj() {
        return obj;
    }

    public void setObj(Object object) {
        this.obj = object;
    }
}
